<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexProjectIdPlanDeliveryIdInTaskTable extends AbstractMigration
{
    public function up()
    {
        $this->table('task')
            ->addIndex(['project_id', 'plan_delivery_time'], ['name' => 'idx_project_id_plan_delivery_time', 'type' => 'normal'])
            ->save();
    }

    public function down()
    {
        $this->table('task')
            ->removeIndexByName('idx_project_id_plan_delivery_time')
            ->save();
    }
}
